Skip to content

Instantly share code, notes, and snippets.

@pedrominicz
pedrominicz / vscode.md
Last active May 8, 2024 19:20
Minimal VSCode config.

The most important setting

The VSCode binary available on the official website IS NOT FREE SOFTWARE ("free" as in "freedom"). The binary there is under a proprietary license. VSCode's source code is under the MIT license, but the MIT license allows binaries to be redistributed under a proprietary license.

Free distributions of VSCode exist, namely Code OSS and VSCodium. However, Code OSS ships the default VSCode configuration, meaning it comes with telemetry enabled and SENDS USAGE DATA TO MICROSOFT. VSCodium comes with telemetry disabled. Therefore, I recommend using VSCodium.

With that in mind, whatever VSCode distribution you choose, the most important setting in this guide is:

"telemetry.telemetryLevel": "off"
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 19:19
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@vinicius-stutz
vinicius-stutz / README.md
Last active May 8, 2024 19:19
Máscara p/ telefones com 8 ou 9 dígitos (jquery.mask.js)
@TengdaHan
TengdaHan / ddp_notes.md
Last active May 8, 2024 19:15
Multi-node-training on slurm with PyTorch

Multi-node-training on slurm with PyTorch

What's this?

  • A simple note for how to start multi-node-training on slurm scheduler with PyTorch.
  • Useful especially when scheduler is too busy that you cannot get multiple GPUs allocated, or you need more than 4 GPUs for a single job.
  • Requirement: Have to use PyTorch DistributedDataParallel(DDP) for this purpose.
  • Warning: might need to re-factor your own code.
  • Warning: might be secretly condemned by your colleagues because using too many GPUs.
@aaronhuang1005
aaronhuang1005 / Experiment1.r
Last active May 8, 2024 19:15
生醫訊號處理的實作 exp1 R script
# Created on Wed May 8 14:12:20 2024
# @author: Aaron Huang
#---------------------------------------------------------------------------------
# install signal library
install.packages("signal")
library("signal")
convolution <- function(x,h){
@tonY1883
tonY1883 / ValidateYoutubeVideoId.js
Created September 14, 2017 02:18
A small trick to check if youtube video exist with its id.
function validVideoId(id) {
var img = new Image();
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg";
img.onload = function () {
checkThumbnail(this.width);
}
}
function checkThumbnail(width) {
//HACK a mq thumbnail has width of 320.
#!/bin/bash
VERSION="1.1.8"
info() {
echo -e "\033[32m[Info]\033[0m $1"
}
error() {
echo -e "\033[31m[Error]\033[0m $1"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidteren
davidteren / nerd_fonts.md
Last active May 8, 2024 19:07
Install Nerd Fonts via Homebrew [updated & fixed]